<template>
  <div class="q-pa-md">
    <t-carousel
      v-model="slide"
      transition-prev="slide-right"
      transition-next="slide-left"
      swipeable
      animated
      control-color="amber"
      navigation
      padding
      arrows
      height="300px"
      class="bg-grey-9 shadow-2 rounded-borders"
    >
      <t-carousel-slide :name="1" class="column no-wrap">
        <div
          class="row fit justify-start items-center q-gutter-xs q-col-gutter no-wrap"
        >
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/mountains.jpg"
          />
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/parallax1.jpg"
          />
        </div>
      </t-carousel-slide>
      <t-carousel-slide :name="2" class="column no-wrap">
        <div
          class="row fit justify-start items-center q-gutter-xs q-col-gutter no-wrap"
        >
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/parallax2.jpg"
          />
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/quasar.jpg"
          />
        </div>
      </t-carousel-slide>
      <t-carousel-slide :name="3" class="column no-wrap">
        <div
          class="row fit justify-start items-center q-gutter-xs q-col-gutter no-wrap"
        >
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/cat.jpg"
          />
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/linux-avatar.png"
          />
        </div>
      </t-carousel-slide>
      <t-carousel-slide :name="4" class="column no-wrap">
        <div
          class="row fit justify-start items-center q-gutter-xs q-col-gutter no-wrap"
        >
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/material.png"
          />
          <t-img
            class="rounded-borders col-6 full-height"
            src="https://cdn.quasar.dev/img/donuts.png"
          />
        </div>
      </t-carousel-slide>
    </t-carousel>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        slide: ref(1),
      };
    },
  };
</script>
